Conversation
…PIs via mssql-auth.dll.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2864 +/- ##
============================================
+ Coverage 60.59% 62.91% +2.31%
- Complexity 4902 5481 +579
============================================
Files 151 151
Lines 34827 38362 +3535
Branches 5834 6967 +1133
============================================
+ Hits 21105 24135 +3030
- Misses 10902 11184 +282
- Partials 2820 3043 +223 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
muskan124947
approved these changes
Feb 17, 2026
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
machavan
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the last remaining ADAL dependency in the JDBC driver by migrating Windows Active Directory Integrated Authentication from the deprecated ADAL library to MSQA (Microsoft SQL Query Authentication) APIs. The authentication flow now uses mssql-auth.dll instead of the legacy adalsql.dll (ADAL-based).
Problem Statement
Windows AAD Integrated authentication relies on native calls through mssql-jdbc_auth.dll, which called the deprecated adalsql.dll (ADAL). This was the last remaining ADAL dependency in the JDBC driver and needed to be removed as part of Microsoft's ADAL deprecation initiative.
Solution
This change modernizes Windows AAD Integrated Authentication by refactoring the native auth flow to route all token acquisition through MSQA APIs via mssql-auth.dll, replacing legacy ADAL usage with MSAL C++ and fully removing the adalsql.dll dependency. The JNI interface has been updated to align with the new MSQA-based native contract, eliminating ADAL-specific parameters and references, and updating error messages to reflect the new DLL architecture.
Old Flow:
SQLServerConnection.java → mssql-jdbc-auth.dll (JNI wrapper) → adalsql.dll (deprecated ADAL) → Azure Active Directory
New Flow:
SQLServerConnection.java → mssql-jdbc-auth.dll (JNI wrapper) → mssql-auth.dll (MSAL C++) → Azure Active Directory